<template>
  <div>
    <div class="recommend-title">热销推荐</div>
      <ul>
        <li class="item border-bottom" v-for="item of recommendList " :key="item.id">
          <img class="item-img" :src="item.imgUrl">
          <div class="item-info">
            <p class="item-title">{{item.title}}</p>
            <p class="item-desc">{{item.desc}}</p>
            <button class="item-button">查看详情</button>
          </div>
        </li>
      </ul>
    </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    recommendList: Array
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/mixins.styl"
  .recommend-title
    line-height .6rem
    background #eee
    margin-top .2rem
    text-indent .2rem
  .item
    display flex
    height 2.4rem
    overflow hidden
    .item-img
      width 2rem
      height 2rem
      padding .2rem
    .item-info
      flex 1
      padding: .2rem
      min-width 0
      .item-title
        margin-top: .26rem
        line-height .44rem
        font-size .32rem
        ellipsis()
      .item-desc
        margin-top: .14rem
        line-height: .34rem
        color #ccc
        ellipsis()
      .item-button
        background #ff9300
        border-radius .06rem
        padding 0 .2rem
        margin-top .2rem
        color #fff
</style>
